<template>
  <el-container>
    <el-main>
      <el-row>
        <div class="align-oper"><el-button plain @click="handle_click_back">Back</el-button></div>
        <div class="align-oper"><el-button type="primary" @click="handle_click_save">Save</el-button></div>
        <div class="align-oper"><el-button type="primary" @click="handle_click_edit">Edit</el-button></div>
      </el-row>
      <el-row>
        <div class="align-oper"><el-button type="primary" @click="handle_click_publish">Publish</el-button></div>
        <div class="align-oper"><el-button type="primary" @click="handle_click_withdraw">Withdraw</el-button></div>
      </el-row>
      <p></p>
      <div class="align-url" v-html="rowData.url"></div>
      <div class="align-brief" v-html="rowData.issueDate"></div>
      <div class="align-brief" v-html="rowData.source"></div>
      <p></p>
      <div class="align-title" v-html="rowData.title"></div>
      <p></p>
      <div v-show="!isEdit" v-html="rowData.content" align="left"></div>
      <el-input v-show="isEdit" v-model="rowData.title"/>
      <el-input v-show="isEdit"
                type="textarea"
                :rows="30"
                placeholder="请输入内容"
                v-model="rowData.content">
      </el-input>
    </el-main>
  </el-container>
</template>

<script>
  import ElButton from "element-ui/packages/button/src/button";

  var baseUrl = "http://129.1.9.46:8726"
  export default {
    components: {ElButton},
    name: "Details",
    data: function() {
      console.log('in detail data.')
      return {
        rowData: this.$route.params.rowData
      }
      // alert(this.$route.params.rowData.title)
    },
    methods: {
      handle_click_back: function(event) {
        this.$router.go(-1)
      }
    }
  }
</script>
